package com.cq.oa.service.sm;

import java.util.List;
import java.util.Map;

import oa.base.service.BaseService;
import oa.base.util.Page;
import oa.base.util.tree.TreeNode;

import com.cq.oa.domain.sm.User;

public interface UserService extends BaseService<User>{

	
	/**
	 * 查询用户
	 * @param params
	 * @return
	 */
	public List<User> findUserList(Map<String,Object> params);
	
	
	/**
	 * 查询用户
	 * @param params
	 * @return
	 */
	public User findUser(Map<String,Object> params);
	
	
	/**
	 * 查询用户
	 * @param params
	 * @return
	 */
	public User getUser(Long sid);
	
	/**
	 * 验证帐号密码
	 * @param username
	 * @param password
	 * @throws Exception 
	 */
	public void doCheckAccount(String username,String password,String keyword) throws Exception;
	
	/**
	 * 添加用户信息
	 * @param user
	 * @return
	 * @throws Exception 
	 */
	public Long saveUser(User user,Long deptId,String deptCname) throws Exception;
	
	
	public Page<User> findByPageParm(Map<String,Object> params,int pageNo,int pageSize);
	
	
	public List<User> findUserByEmail(List<String> emails);
	
	/**
	 * 模糊查询数据
	 * @param likes
	 * @param topNo
	 * @return
	 * lilang 
	 * 2013-10-17上午11:05:12
	 */
	public List<Map<String,Object>> findUserByEmail(String likes,int topNo);
	
	/**
	 * 模糊查询数据
	 * @param likes
	 * @param topNo
	 * @return
	 * lilang 
	 * 2013-10-17上午11:05:12
	 */
	public List<User> findUserByName(String likes,int topNo);
	
	public List<TreeNode> findOrgChild(String id);
	
	
	
}
